<?php
    $arrListItemsCount = !empty($this->arrListItemsCount)?$this->arrListItemsCount:array('total_pages' => 0, 'current_page' => 0);
?>

<?php if($arrListItemsCount['total_pages'] > 1):?>
    <ul class="cp_paging">
        <li>
            <?php echo sprintf(YouNet_Util::translate('CP_PAGE_OF'), $arrListItemsCount['current_page'], $arrListItemsCount['total_pages']); ?>
        </li>
        <?php if($arrListItemsCount['current_page'] > 1):?>
        <li>
            <a href="<?php echo $this->pageUrl(array_merge($this->query, array('page' => $arrListItemsCount['current_page'] -1)));?>">
                <?php echo $this->translate('Previous page') ?>
            </a>
        </li>
        <?php endif;?>
        <?php if($arrListItemsCount['current_page'] < $arrListItemsCount['total_pages']):?>
        <li>
            <a href="<?php echo $this->pageUrl(array_merge($this->query, array('page' => $arrListItemsCount['current_page'] + 1)));?>">
                <?php echo $this->translate('Next page') ?>
            </a>
        </li>
        <?php endif;?>
    </ul>
<?php endif;?>